import { defineStore } from "pinia"
// import piniaPersistConfig from "@/store/helper/persist"

export const useUserStore = defineStore({
    id: "pinia-user",
    state: () => ({
        token: "",
        userInfo: { name: "Geeker" }
    }),
    getters: {},
    actions: {
        // Set Token
        setToken (token) {
            this.token = token
        },
        // Set setUserInfo
        setUserInfo (userInfo) {
            this.userInfo = userInfo
        }
    },
    // persist: piniaPersistConfig("pinia-user")
})
